package hmis.pos.Repository;

import hmis.pos.Base.BaseRepository.BaseRepository;
import hmis.pos.Entity.CheckIn;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CheckInRepository extends BaseRepository<CheckIn> {

    @Query(value = "select * from checkin where roomid = ?1", nativeQuery = true)
    List<CheckIn> findByRoomid(int roomid);

    @Query(value = "select * from checkin where orderdetail_id = ?1", nativeQuery = true)
    List<CheckIn> findByOrderDetailId(String id);

    @Query(value = "select * from checkin where roomid = ?1", nativeQuery = true)
    List<CheckIn> findByRoomId(String id);

}
